<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>

<div class="content-wrap">
        <div class="wrapper" style="bottom: 50px;">
            <ul class="nav nav-tabs">
                <li>
                    <a href="#"  onclick="loadDiv('mainCenterDiv','${ctx}/csm/expStorageDept/index')">消耗品库存单位字典列表</a>
                </li>
                <li class="active">
                    <a href="#" onclick="loadDiv('mainCenterDiv','${ctx}/csm/expStorageDept/form')">
                        <c:choose>
                            <c:when test="${expStorageDept.id==''|| expStorageDept.id==null}">
                                消耗品库存单位字典添加
                            </c:when>
                            <c:otherwise>消耗品库存单位字典修改</c:otherwise>
                        </c:choose>
                    </a>
                </li>
            </ul>
            <section class="panel panel-default">
                <div class="panel-body">
                    <div class="col-lg-12">
                        <form:form id="inputForm" data-parsley-validate="" modelAttribute="expStorageDept" onsubmit="return formSaveLoad('mainCenterDiv','inputForm','${ctx}/csm/expStorageDept/save','${ctx}/csm/expStorageDept/index');" method="post" class="form-horizontal">
                            <form:hidden path="id"/>
                            <form:hidden path="storageName"/>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">库房名称：</label>
                                    <div class="col-sm-4">
                                        <sys:treeselect selectedParent="true"
                                                        id="storageCode" update="false" isnull="true"
                                                        name="storageCode" value="${expStorageDept.storageCode}"
                                                        labelName="${expStorageDept.storageName}"
                                                        labelValue="${expStorageDept.storageName}" title="科室"
                                                        url="/sys/orgDept/treeData" cssClass="form-control"/>
                                    </div>
                                </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">库房等级：</label>
                                <div class="col-sm-4">
                                    <form:select data-parsley-required="true" path="storageLevel" htmlEscape="false" class="form-control" >
                                        <form:option value="" label=""/>
                                        <form:options items="${fns:getDictList('STORAGE_LEVEL')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
                                    </form:select>
                                </div>
                            </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">付款单前缀：</label>
                                    <div class="col-sm-4">
                                        <form:input data-parsley-required="true" path="disburseNoPrefix" htmlEscape="false" class="form-control"  />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">当前付款单号：</label>
                                    <div class="col-sm-4">
                                        <form:input data-parsley-required="true" path="disburseNoAva" htmlEscape="false" class="form-control"  />
                                    </div>
                                </div>
                              <%--  <div class="form-group">
                                    <label class="col-sm-2 control-label">出库单可用流水号：</label>
                                    <div class="col-sm-4">
                                        <form:input data-parsley-required="true" path="exportNoAva" htmlEscape="false" class="form-control"  />
                                    </div>
                                </div>--%>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">出库单号前缀：</label>
                                    <div class="col-sm-4">
                                        <form:input data-parsley-required="true" path="exportNoPrefix" htmlEscape="false" class="form-control" />
                                    </div>
                                </div>
                               <%-- <div class="form-group">
                                    <label class="col-sm-2 control-label">入库单可用流水号：</label>
                                    <div class="col-sm-4">
                                        <form:input data-parsley-required="true" path="importNoAva" htmlEscape="false" class="form-control"  />
                                    </div>
                                </div>--%>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">入库单号前缀：</label>
                                    <div class="col-sm-4">
                                        <form:input data-parsley-required="true" path="importNoPrefix" htmlEscape="false" class="form-control"  />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">备注信息：</label>
                                    <div class="col-sm-4">
                                        <form:textarea path="remarks" htmlEscape="false" rows="3" class="form-control"  maxlength="1000"/>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-sm-offset-2 col-sm-10">
                                        <input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存">&nbsp;
                                        <input id="btnCancel" class="btn" type="button" value="返 回" onclick="loadDiv('mainCenterDiv','${ctx}/csm/expStorageDept/index')">
                                </div>
                            </div>
                        </form:form>
                    </div>

                </div>
            </section>
        </div>
    </div>
<script>
    //如果标题是修改属性，那么单位名称不可修改不可编辑更改
    var idValue = document.getElementById('id').value;
    if(idValue !="" && idValue !=null){
        $("#storageCodeName").attr("disabled",true);
        $("#storageCodeButton").attr("disabled",true);
    }
</script>